package com.ruoyi.achievements.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.achievements.mapper.JwTeachAchievementsMapper;
import com.ruoyi.achievements.domain.JwTeachAchievements;
import com.ruoyi.achievements.service.IJwTeachAchievementsService;

/**
 * 教学成果奖Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class JwTeachAchievementsServiceImpl implements IJwTeachAchievementsService 
{
    @Autowired
    private JwTeachAchievementsMapper jwTeachAchievementsMapper;

    /**
     * 查询教学成果奖
     * 
     * @param teachId 教学成果奖主键
     * @return 教学成果奖
     */
    @Override
    public JwTeachAchievements selectJwTeachAchievementsByTeachId(Long teachId)
    {
        return jwTeachAchievementsMapper.selectJwTeachAchievementsByTeachId(teachId);
    }

    /**
     * 查询教学成果奖列表
     * 
     * @param jwTeachAchievements 教学成果奖
     * @return 教学成果奖
     */
    @Override
    @DataScope(deptAlias = "d",userAlias = "d")
    public List<JwTeachAchievements> selectJwTeachAchievementsList(JwTeachAchievements jwTeachAchievements)
    {
        return jwTeachAchievementsMapper.selectJwTeachAchievementsList(jwTeachAchievements);
    }
    /**
     * 查询教学成果奖列表
     * 
     * @param jwTeachAchievements 教学成果奖
     * @return 教学成果奖
     */
    @Override
    @DataScope(deptAlias = "d",userAlias = "d")
    public List<JwTeachAchievements> selectAllJwTeachAchievements(JwTeachAchievements jwTeachAchievements)
    {
        return jwTeachAchievementsMapper.selectAllJwTeachAchievements(jwTeachAchievements);
    }
    /**
     * 新增教学成果奖
     * 
     * @param jwTeachAchievements 教学成果奖
     * @return 结果
     */
    @Override
    public int insertJwTeachAchievements(JwTeachAchievements jwTeachAchievements)
    {
        return jwTeachAchievementsMapper.insertJwTeachAchievements(jwTeachAchievements);
    }

    /**
     * 修改教学成果奖
     * 
     * @param jwTeachAchievements 教学成果奖
     * @return 结果
     */
    @Override
    public int updateJwTeachAchievements(JwTeachAchievements jwTeachAchievements)
    {
        jwTeachAchievements.setUpdateTime(DateUtils.getNowDate());
        return jwTeachAchievementsMapper.updateJwTeachAchievements(jwTeachAchievements);
    }

    /**
     * 批量删除教学成果奖
     * 
     * @param teachIds 需要删除的教学成果奖主键
     * @return 结果
     */
    @Override
    public int deleteJwTeachAchievementsByTeachIds(Long[] teachIds)
    {
        return jwTeachAchievementsMapper.deleteJwTeachAchievementsByTeachIds(teachIds);
    }

    /**
     * 删除教学成果奖信息
     * 
     * @param teachId 教学成果奖主键
     * @return 结果
     */
    @Override
    public int deleteJwTeachAchievementsByTeachId(Long teachId)
    {
        return jwTeachAchievementsMapper.deleteJwTeachAchievementsByTeachId(teachId);
    }
}
